package com.itheima.util;

import java.util.*;
import org.json.JSONObject;
import com.baidu.aip.ocr.AipOcr;
public class Sample {


    public static void main(String[] args) {

        //设置APPID/AK/SK
        String APP_ID = "88642316";
        String API_KEY = "Ctt1QePhxSiVWkTnbUh35mZJ";
        String SECRET_KEY = "QNhKIP59gZabH76vWpIg1IlUuKbCRXF9";
        // 初始化一个AipOcr
        AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
        // 调用接口
        String path = "D:\\pictures\\gaitubao_1652714277(1)_jpg.jpg";
        JSONObject res = client.basicGeneral(path, new HashMap<String, String>());
        System.out.println(res.toString(2));

    }
}